package guoanmaker.operator.business.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorLeaseSpaceNew;

public interface OperatorLeaseSpaceNewRepository extends JpaRepository<OperatorLeaseSpaceNew, String>, JpaSpecificationExecutor<OperatorLeaseSpaceNew> {
	@Modifying
	@Query(value = "delete from t_operator_lease_space_new where city_code =:cityCode", nativeQuery= true)
	public void deleteOperatorLeaseSpaceNewByCityCode(@Param("cityCode") String cityCode);
	@Query("select s from OperatorLeaseSpaceNew s where s.cityCode=:cityCode")
	public List<OperatorLeaseSpaceNew> findOperatorLeaseSpaceNewByCityCode(@Param("cityCode") String cityCode);

}
